<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Cache-Control" content="no-cache" />
<!--meta-->
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no;">
<title>{{$pageTitle}}-{{$site[title]}}</title>
<style>*{padding:0;margin:0;} body,.container{max-width: 100% !important;}</style>

<?PHP echo $this->Combinator->less(); ?>
{{$this->Html->css(array('font-awesome.min.css','ui-customer.css',));}}
<style>
@charset "utf-8";
/*css reset*/
body{background:#f3f3f3;}
body,button,input,select,textarea{ font-size:14px;}
h1,h2,.Content-title{font-size:20px;}
h3{font-size:20px;}
a{text-decoration:none;color:#31497c;}
a.red{text-decoration:none;color:#ff0000;}
a.black{text-decoration:none;color:#000000;}
a.green{text-decoration:none;color:#1ca446;}
a:hover{text-decoration:none; }
img,.Content-body img { border:0;vertical-align:middle;max-width:100%;}
.Content-body{padding:0;}
button,input,select,textarea{font-size:100%; vertical-align:middle}
header, footer, article, section, nav, menu, hgroup,time{display: block;clear:all; }
.wrap{width:98%;line-height:18px;}
.navbar {margin-bottom: 0px;}
.panel {border:0;}
.panel-body {padding:0px;}
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td{padding:3px;}
#maincontent{max-width:560px;margin:0px auto;background: #FFF;box-sizing: border-box;padding: 15px 0;}
.breadcrumb,.ui-portlet-header{padding-left: 0px;}
hr,.ui-portlet{margin:5px 0;}
hr{border-top: 1px solid #999;}
.nav-pills > li >a{    padding: 5px 10px !important;   margin-right: 10px !important;}
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
    position: relative;
    min-height: 1px;
    padding-left: 5px;
    padding-right: 5px;
}
.row,.form-horizontal .form-group {
    margin-left: -5px;
    margin-right: -5px;
}
.questions{padding:10px 0;color:#333;border-bottom:1px dashed #ccc;}
table{width:100%;border-spacing:2px;border-collapse: separate;margin:0px;padding:0px;}
tr.active{background-color: #d9d9d9;}
tr.correct{background-color: #dff0d8;border-color: #d6e9c6;color: #468847;}
td,th{padding:5px 0px;border:0 none;}
label{cursor: pointer;}
.btn-primary{background-color: #0c9794;font-size:20px;color:#FFF;}
h3,h4,.ui-state-default{color:#0c9794;line-height: 1.6em;}
.ui-widget-content {
    background-color: transparent;
    border: 0 none;
}
.ui-state-default{border: 0 none;}
</style>
<script type="text/javascript" src="/js/jquery/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/jquery/jquery.cookie.js"></script>
<script type="text/javascript" src="/js/jquery/jquery.validate.js"></script>
<script type="text/javascript" src="/js/i18n/language-zh-cn.js"></script>
<script type="text/javascript" src="/js/common.js"></script>
	<script type="text/javascript" src="/js/front.js"></script>
<script type="text/javascript">
var BASEURL = "{{APP_SUB_DIR}}";
var ADMIN_BASEURL = BASEURL+"/manage";

$(function(){
	$('#questionaire-form').data('callback',function(request){
		if(request.ret == 0) {
			$('#questionaire-info').hide();
			$('#success-msg').show();
			$('#coverimg').hide();
		}
	});
});

		
</script>

{{if $isWeixin}}
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>

wx.config({
    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
    appId: "{{$signPackage['appId']}}", // 必填，公众号的唯一标识
    timestamp: {{$signPackage['timestamp']}}, // 必填，生成签名的时间戳
    nonceStr: "{{$signPackage['nonceStr']}}", // 必填，生成签名的随机串
    signature: "{{$signPackage['signature']}}",// 必填，签名，见附录1
    jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo','onMenuShareQZone'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
});

window.share_config = {
     "share": {
        "imgUrl": "{{$Questionnaire['Questionnaire']['coverimg']}}",//分享图，默认当相对路径处理，所以使用绝对路径的的话，“http://”协议前缀必须在。
        "desc" : "{{$Questionnaire['Questionnaire']['summary']?$Questionnaire['Questionnaire']['summary']:$pageTitle.'-'.$site[title]}}",//摘要,如果分享到朋友圈的话，不显示摘要。
        "title" : '{{$pageTitle}}',//分享卡片标题
        "link": window.location.href,//分享出去后的链接，这里可以将链接设置为另一个页面。
        "success":function(){//分享成功后的回调函数
        },
        'cancel': function () { 
            // 用户取消分享后执行的回调函数
        }
    }
};  

wx.ready(function(){
	wx.onMenuShareAppMessage(share_config.share);//分享给好友
    wx.onMenuShareTimeline(share_config.share);//分享到朋友圈
    wx.onMenuShareQQ(share_config.share);//分享给手机QQ
    wx.onMenuShareWeibo(share_config.share); //分享到微博
    wx.onMenuShareQZone(share_config.share); //分享到QQ空间
});

</script>
{{/if}}

<noscript>
请开启您浏览器的JavaScript选项
</noscript>
</head>
<body>
	<div id="maincontent"  style="padding:15px;">
		<div id="coverimg" style="margin:-15px -15px 15px -15px;">
			{{if $Questionnaire['Questionnaire']['coverimg']}}
				{{$this->Html->image( $Questionnaire['Questionnaire']['coverimg'],array('style'=>'width:100%;') )}}
			{{/if}}
		</div>
		<h3>{{$Questionnaire['Questionnaire']['name']}}</h3>
		<div id="questionaire-info">
			<div>{{$Questionnaire['Questionnaire']['content']}}</div>
			<hr style="border-top: 1px solid #eee;">
			<div id="survey_question_list">
				<form id="questionaire-form" action="/surveys/submitForm" class="form-horizontal" role="form" method="post" accept-charset="utf-8">
					<input type="hidden" name="questionnaire_id" value="{{$Questionnaire['Questionnaire']['id']}}">
				{{$question_list}}
				<p><br/></p>
				<div class="form-group text-center">
			    	<button class="btn btn-primary" id="btnsubmit" type="submit">提交</button>
			    </div>
				</form>
			</div>
		</div>
		<div id="success-msg" style="text-align:center;margin:50px auto;display:none;">
			
			<div>
				<img style="width: 120px !important;" src="/img/form/success.png">
			</div>
			<div>
				<div style="color:#000000;margin-bottom: 10px;line-height: 25px;  font-size: 20px; font-size: 2rem;">提交成功！</div>
				<div style="color:#666666;"><p>我们已收到您提交的资料，非常感谢</p></div>
			</div>
			<p><br/><br/></p>
			<div><a href="{{Router::url()}}" class="btn btn-default">返回</a></div>
		</div>
		

	</div>
	<p style="text-align:center;margin:10px auto;"><a href="http://www.135editor.com/" style="color:#999;font-size:14px;">由<strong>135编辑器</strong>提供技术支持</a></p>

</body>
</html>